﻿@using ForzaGT3.Models
@using Google.YouTube;
@model IEnumerable<Video>
@{

}
<div class="greybg header shadow">
    VIDEO <span class="more"><a href="http://www.youtube.com/user/ForzaGT3Official" target="_blank">More</a> </span>
</div>
@if (Model!=null)
{
    int dataCount = 0;
    foreach (Video data in Model)
    {
        
        if (dataCount == 0)
        {
            <div class="videocontent" style="height: 177px;">
                    <object width="325" height="177">
                        <param name="movie" value="http://www.youtube.com/v/@data.VideoId"/>
                        <param name="allowFullScreen" value="true"/>
                        <param name="allowscriptaccess" value="always"/>
                        <param name="wmode" value="opaque"/>
                        <embed src="http://www.youtube.com/v/@data.VideoId" 
		                    type="application/x-shockwave-flash" width="325" 
		                    height="177" allowscriptaccess="always" allowfullscreen="true" 
		                    wmode="opaque">
                        </embed>
                    </object>
            </div>
        }
        else
        {
            <div class="videocontent greybgtxt widget">
                <img src="@data.Thumbnails[0].Url" alt="@data.Title" align="left" style="margin-right: 10px; width:118px;"/>
                <div>
                    @data.Title
                  
                </div>
                <a href="@data.WatchPage" target="_blank"><img src="@Links.Assets.images.watch_jpg" alt="watch video" /></a>
            </div>
        }
        
        dataCount += 1;
    }
}
